package com.jyw.business.ins.domain.vo.web;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyw.business.ast.domain.vo.web.InsTaskAstPageVo;
import com.jyw.common.annotation.Conversion;
import com.jyw.common.enums.ConversionType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

import java.time.LocalDateTime;

/**
 * @author 沈峻
 * @ClassName TaskUnitPageVo
 * @Description 巡检任务单元查询返回实体
 * @Date 2023/9/27 15:35
 **/
@Data
@ApiModel("巡检任务单元查询返回实体")
@FieldNameConstants
public class TaskUnitPageVo {

    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("巡检单元名称")
    private String unitName;

    @ApiModelProperty("编号")
    private String unitCode;

    @ApiModelProperty("任务开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime inspectStartTime;

    /** 巡检结束时间 */
    @ApiModelProperty("任务结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime inspectEndTime;

    @ApiModelProperty("使用科室")
    @Conversion(value = ConversionType.DEPT,name = Fields.useDepartName)
    private Long useDepartId;

    @ApiModelProperty("使用科室名称")
    private String useDepartName;

    @ApiModelProperty("单元所在位置")
    private String unitAddress;

    @ApiModelProperty("巡检人")
    @Conversion(value = ConversionType.USER,name = InsTaskAstPageVo.Fields.inspectUserName)
    private Long inspectUserId;

    @ApiModelProperty("巡检人名称")
    private String inspectUserName;

    @ApiModelProperty("任务状态 (1已超时 0待巡检)")
    private Integer state;
}
